Branchwell

PulseCanvas / app · pulsecanvas.ai / Sources / PulseCanvas / Resources / ProjectM / Presets / Hypnotic / Polar Warp / flexi - grind my glitch up [044].milk

1MILKDROP_PRESET_VERSION=201
2PSVERSION=3
3PSVERSION_WARP=3
4PSVERSION_COMP=3
5[preset00]
6fRating=5.000000
7fGammaAdj=1.000
8fDecay=1.000
9fVideoEchoZoom=2.000
10fVideoEchoAlpha=0.000
11nVideoEchoOrientation=1
12nWaveMode=0
13bAdditiveWaves=1
14bWaveDots=0
15bWaveThick=0
16bModWaveAlphaByVolume=1
17bMaximizeWaveColor=1
18bTexWrap=1
19bDarkenCenter=0
20bRedBlueStereo=0
21bBrighten=0
22bDarken=0
23bSolarize=0
24bInvert=0
25fWaveAlpha=0.009
26fWaveScale=2.713
27fWaveSmoothing=0.000
28fWaveParam=0.000
29fModWaveAlphaStart=1.200
30fModWaveAlphaEnd=1.200
31fWarpAnimSpeed=0.204
32fWarpScale=8.471
33fZoomExponent=1.00000
34fShader=0.000
35zoom=0.99951
36rot=0.00000
37cx=0.500
38cy=0.500
39dx=0.00000
40dy=0.00000
41warp=0.15038
42sx=1.00000
43sy=1.00000
44wave_r=0.440
45wave_g=0.400
46wave_b=1.000
47wave_x=0.500
48wave_y=0.500
49ob_size=0.005
50ob_r=0.010
51ob_g=0.000
52ob_b=0.000
53ob_a=1.000
54ib_size=0.260
55ib_r=0.250
56ib_g=0.250
57ib_b=0.250
58ib_a=0.000
59nMotionVectorsX=44.160
60nMotionVectorsY=33.600
61mv_dx=0.000
62mv_dy=0.000
63mv_l=0.500
64mv_r=1.000
65mv_g=0.000
66mv_b=0.000
67mv_a=0.000
68b1n=0.000
69b2n=0.000
70b3n=0.000
71b1x=1.000
72b2x=1.000
73b3x=1.000
74b1ed=0.000
75wavecode_0_enabled=1
76wavecode_0_samples=512
77wavecode_0_sep=4
78wavecode_0_bSpectrum=1
79wavecode_0_bUseDots=0
80wavecode_0_bDrawThick=1
81wavecode_0_bAdditive=1
82wavecode_0_scaling=100.00000
83wavecode_0_smoothing=0.00000
84wavecode_0_r=0.050
85wavecode_0_g=0.150
86wavecode_0_b=1.000
87wavecode_0_a=1.000
88wave_0_init1=t2 = 0;
89wave_0_init2=t3 = 0;
90wave_0_init3=t4 = 0;
91wave_0_init4=ab = 1;
92wave_0_per_frame1=// parameters
93wave_0_per_frame2=w = time*0.5; // rotation (0..2Pi)
94wave_0_per_frame3=t1 = 0.5; // center for rotation (x)
95wave_0_per_frame4=t2 = 0.5; // center for rotation (y)
96wave_0_per_frame5=t3 = 1; // scale
97wave_0_per_frame6=t4 = 0; // translation (x)
98wave_0_per_frame7=t5 = 0; // translation (y)
99wave_0_per_frame8=t6 = sin(w);
100wave_0_per_frame9=t7 = cos(w);
101wave_0_per_point1=xx = if(equal(sample,0),q3,xx);
102wave_0_per_point2=yy = if(equal(sample,0),q4,yy);
103wave_0_per_point3=
104wave_0_per_point4=
105wave_0_per_point5=dx = xx*(1-xx)-q5*xx*yy/(xx+q6);
106wave_0_per_point6=dy = q7*yy*(1-yy/xx);
107wave_0_per_point7=
108wave_0_per_point8=x1 = xx;
109wave_0_per_point9=y1 = yy;
110wave_0_per_point10=
111wave_0_per_point11=xx = xx+dx*0.2;
112wave_0_per_point12=yy = yy+dy*0.2;
113wave_0_per_point13=
114wave_0_per_point14=x1 = 0.5+(x1-0.5)/q1 + dy*value1*0.01;
115wave_0_per_point15=y1 = 0.5+(y1-0.5)/q2 - dx*value1*0.01;
116wave_0_per_point16=
117wave_0_per_point17=
118wave_0_per_point18=// synchronized affine transformation
119wave_0_per_point19=x = q26 + ((x1-q26)*q32 + (y1-q27)*q31)*q28 + q29;
120wave_0_per_point20=y = q27 + (-(x1-q26)*q31 + (y1-q27)*q32)*q28 + q30;
121wavecode_1_enabled=0
122wavecode_1_samples=512
123wavecode_1_sep=0
124wavecode_1_bSpectrum=0
125wavecode_1_bUseDots=0
126wavecode_1_bDrawThick=0
127wavecode_1_bAdditive=0
128wavecode_1_scaling=1.00000
129wavecode_1_smoothing=0.50000
130wavecode_1_r=1.000
131wavecode_1_g=1.000
132wavecode_1_b=1.000
133wavecode_1_a=1.000
134wave_1_per_point1=xx1 = if(equal(sample,0),q11,xx1);
135wave_1_per_point2=yy1 = if(equal(sample,0),q12,yy1);
136wave_1_per_point3=zz1 = if(equal(sample,0),q13,zz1);
137wave_1_per_point4=
138wave_1_per_point5=dx1 = q14*(yy1-xx1);
139wave_1_per_point6=dy1 = xx1*(q15-zz1)-yy1;
140wave_1_per_point7=dz1 = xx1*yy1-q16*zz1;
141wave_1_per_point8=xx1 = xx1 + q17*dx1;
142wave_1_per_point9=yy1 = yy1 + q17*dy1;
143wave_1_per_point10=zz1 = zz1 + q17*dz1;
144wave_1_per_point11=
145wave_1_per_point12=my_x = xx1*0.02;
146wave_1_per_point13=my_y = yy1*0.02;
147wave_1_per_point14=my_z = zz1*0.02;
148wave_1_per_point15=
149wave_1_per_point16=x = 0.5 + my_x;
150wave_1_per_point17=y = 0.5 + my_y;
151wavecode_2_enabled=0
152wavecode_2_samples=512
153wavecode_2_sep=0
154wavecode_2_bSpectrum=0
155wavecode_2_bUseDots=0
156wavecode_2_bDrawThick=0
157wavecode_2_bAdditive=0
158wavecode_2_scaling=1.00000
159wavecode_2_smoothing=0.50000
160wavecode_2_r=1.000
161wavecode_2_g=1.000
162wavecode_2_b=1.000
163wavecode_2_a=1.000
164wavecode_3_enabled=0
165wavecode_3_samples=512
166wavecode_3_sep=0
167wavecode_3_bSpectrum=0
168wavecode_3_bUseDots=0
169wavecode_3_bDrawThick=0
170wavecode_3_bAdditive=0
171wavecode_3_scaling=1.00000
172wavecode_3_smoothing=0.50000
173wavecode_3_r=1.000
174wavecode_3_g=1.000
175wavecode_3_b=1.000
176wavecode_3_a=1.000
177shapecode_0_enabled=0
178shapecode_0_sides=3
179shapecode_0_additive=1
180shapecode_0_thickOutline=0
181shapecode_0_textured=0
182shapecode_0_num_inst=1
183shapecode_0_x=0.670
184shapecode_0_y=0.530
185shapecode_0_rad=0.17457
186shapecode_0_ang=0.25133
187shapecode_0_tex_ang=3.14159
188shapecode_0_tex_zoom=0.99979
189shapecode_0_r=1.000
190shapecode_0_g=1.000
191shapecode_0_b=1.000
192shapecode_0_a=1.000
193shapecode_0_r2=1.000
194shapecode_0_g2=1.000
195shapecode_0_b2=1.000
196shapecode_0_a2=1.000
197shapecode_0_border_r=1.000
198shapecode_0_border_g=0.500
199shapecode_0_border_b=0.150
200shapecode_0_border_a=0.000
201shapecode_1_enabled=0
202shapecode_1_sides=23
203shapecode_1_additive=1
204shapecode_1_thickOutline=0
205shapecode_1_textured=0
206shapecode_1_num_inst=817
207shapecode_1_x=0.500
208shapecode_1_y=0.500
209shapecode_1_rad=0.02798
210shapecode_1_ang=0.00000
211shapecode_1_tex_ang=3.14159
212shapecode_1_tex_zoom=0.99979
213shapecode_1_r=1.000
214shapecode_1_g=1.000
215shapecode_1_b=1.000
216shapecode_1_a=0.410
217shapecode_1_r2=1.000
218shapecode_1_g2=1.000
219shapecode_1_b2=1.000
220shapecode_1_a2=0.000
221shapecode_1_border_r=1.000
222shapecode_1_border_g=1.000
223shapecode_1_border_b=1.000
224shapecode_1_border_a=0.000
225shapecode_2_enabled=0
226shapecode_2_sides=100
227shapecode_2_additive=0
228shapecode_2_thickOutline=0
229shapecode_2_textured=1
230shapecode_2_num_inst=1
231shapecode_2_x=0.900
232shapecode_2_y=0.500
233shapecode_2_rad=0.10000
234shapecode_2_ang=0.00000
235shapecode_2_tex_ang=0.00000
236shapecode_2_tex_zoom=1.00000
237shapecode_2_r=1.000
238shapecode_2_g=1.000
239shapecode_2_b=1.000
240shapecode_2_a=1.000
241shapecode_2_r2=1.000
242shapecode_2_g2=1.000
243shapecode_2_b2=1.000
244shapecode_2_a2=1.000
245shapecode_2_border_r=1.000
246shapecode_2_border_g=1.000
247shapecode_2_border_b=1.000
248shapecode_2_border_a=0.100
249shape_2_per_frame1=x = sin(time) * .4 + .5;
250shape_2_per_frame2=
251shape_2_per_frame3=
252shape_2_per_frame4=pow( (bass*.15),2);
253shapecode_3_enabled=0
254shapecode_3_sides=36
255shapecode_3_additive=1
256shapecode_3_thickOutline=0
257shapecode_3_textured=0
258shapecode_3_num_inst=1
259shapecode_3_x=0.500
260shapecode_3_y=0.500
261shapecode_3_rad=0.81623
262shapecode_3_ang=0.00000
263shapecode_3_tex_ang=0.00000
264shapecode_3_tex_zoom=1.00000
265shapecode_3_r=0.000
266shapecode_3_g=0.040
267shapecode_3_b=0.000
268shapecode_3_a=1.000
269shapecode_3_r2=0.000
270shapecode_3_g2=0.000
271shapecode_3_b2=0.000
272shapecode_3_a2=0.000
273shapecode_3_border_r=1.000
274shapecode_3_border_g=1.000
275shapecode_3_border_b=1.000
276shapecode_3_border_a=0.000
277shape_3_per_frame1=x = 1-q1;
278shape_3_per_frame2=y = q2;
279shape_3_per_frame3=x = 0.5 + (x - 0.5)*0.25;
280shape_3_per_frame4=y = 0.5 + (y - 0.5)*0.25;
281per_frame_init_1=x1 = 0;
282per_frame_init_2=y1= .001;
283per_frame_init_3=z1 = 0;
284per_frame_1=zoom = 1;
285per_frame_2=warp = 0;
286per_frame_3=wave_a = 0;
287per_frame_4=
288per_frame_5=
289per_frame_6=// below parameters belong to an extended "Lotka-Volterra" model (simple predator-prey differential equation system - see wikipedia)
290per_frame_7=
291per_frame_8=startx = 0.7; // initial predator population (used only for the phase plot)
292per_frame_9=starty = 0.7; // initial prey population
293per_frame_10=
294per_frame_11=a = 1.0; // LV-model parameters - some pairs reach a so-called limit-cycle
295per_frame_12=b = 0.14;
296per_frame_13=d = 0.2;
297per_frame_14=
298per_frame_15=q1 = aspectx;
299per_frame_16=q2 = aspecty;
300per_frame_17=
301per_frame_18=q3 = startx;
302per_frame_19=q4 = starty;
303per_frame_20=
304per_frame_21=q5 = a; // the model parameters are synchronized for the phase plot wave and the per-vertex warp
305per_frame_22=q6 = b;
306per_frame_23=q7 = d;
307per_frame_24=
308per_frame_25=
309per_frame_26=vol = bass*8 + mid*5 + treb*3;
310per_frame_27=m = m*0.97 + vol*0.08;
311per_frame_28=monitor = vol;
312per_frame_29=beat = above(vol,res)*above(vol,m)*above(vol,16);
313per_frame_30=diff = (1-beat)*diff + beat*(vol-res);
314per_frame_31=res = beat*(vol + m*0.04) + (1-beat)*(res - (0.1+diff*0.02)*60/fps);
315per_frame_32=res = max(0,res);
316per_frame_33=
317per_frame_34=w = if(beat,rand(3.14*2),w);
318per_frame_35=x = if(beat,rand(1),x);
319per_frame_36=y = if(beat,rand(1),y);
320per_frame_37=
321per_frame_38=// below parameters belong to a synchronized affine transformation for waves and the per-vertex code (rotate, scale, translate)
322per_frame_39=
323per_frame_40=q26 = 0.5*x; // center for rotation and scaling (x)
324per_frame_41=q27 = 0.5*y; // center for rotation and scaling (y)
325per_frame_42=q28 = 1; // scale
326per_frame_43=q29 = 0.4; // translate x
327per_frame_44=q30 = 0.1; // translate y
328per_frame_45=q31 = sin(w);
329per_frame_46=q32 = cos(w);
330per_frame_47=q25 = w;
331per_frame_48=// TODO: compensate parameter changes for an invariant canvas pane via difference quotients ;)
332per_frame_49=
333per_frame_50=// integration
334per_frame_51=bb = bb*0.98 + bass*0.5;
335per_frame_52=mm = mm*0.98 + mid*0.5;
336per_frame_53=tt = tt*0.98 + treb*0.5;
337per_frame_54=
338per_frame_55=// normalization
339per_frame_56=mx = max(max(bb,mm),tt);
340per_frame_57=mn = min(min(bb,mm),tt);
341per_frame_58=
342per_frame_59=h1 = (bb-mn)/(mx-mn);
343per_frame_60=h2 = (mm-mn)/(mx-mn);
344per_frame_61=h3 = (tt-mn)/(mx-mn);
345per_frame_62=
346per_frame_63=// integration again (for constant change in one variable)
347per_frame_64=v = 0.1/fps;
348per_frame_65=bm = bm + (h1-h2)*v;
349per_frame_66=mt = mt + (h2-h3)*v;
350per_frame_67=bt = bt + (h1-h3)*v;
351per_frame_68=
352per_frame_69=// emit
353per_frame_70=q10 = bm;
354per_frame_71=q11 = mt;
355per_frame_72=q12 = bt;
356per_frame_73=v = bm;
357per_frame_74=q13 = sin(v);
358per_frame_75=q14 = cos(v);
359per_pixel_1=x = 0.5 + (x-0.5)*q1;
360per_pixel_2=y = 0.5 - (y-0.5)*q2;
361per_pixel_3=
362per_pixel_4=x = q26 + (x-q26)/q28 - q29;
363per_pixel_5=y = q27 + (y-q27)/q28 - q30;
364per_pixel_6=
365per_pixel_7=// have a nice warp effect? - rotate it like a shape!
366per_pixel_8=
367per_pixel_9= angle = -q25;
368per_pixel_10=
369per_pixel_11=/////////////////////////////////////////////////////////
370per_pixel_12=X1 = x - q26;
371per_pixel_13=Y1 = y - q27;
372per_pixel_14=x = q26 + cos(-angle)*X1 -sin(-angle)*Y1; // rotate the x/y pane
373per_pixel_15=y = q27 + sin(-angle)*X1 +cos(-angle)*Y1;
374per_pixel_16=/////////////////////////////////////////////////////////
375per_pixel_17=
376per_pixel_18=
377per_pixel_19=dx = x*(1-x)-q5*x*y/(x+q6);
378per_pixel_20=dy = -q7*y*(1-y/x);
379per_pixel_21=
380per_pixel_22=dx = -0.01*dx/q1;
381per_pixel_23=dy = -0.01*dy/q2;
382per_pixel_24=
383per_pixel_25=
384per_pixel_26=//dx = 0;
385per_pixel_27=//dy = 0;
386per_pixel_28=
387per_pixel_29=/////////////////////////////////////////////////////////
388per_pixel_30=dx1 = cos(angle)*dx - sin(angle)*dy; // and finally the dx/dy pane is rotated to match the x/y pane
389per_pixel_31=dy1 = sin(angle)*dx + cos(angle)*dy;
390per_pixel_32=dx = dx1*aspectx;
391per_pixel_33=dy = dy1*aspecty;
392per_pixel_34=/////////////////////////////////////////////////////////
393warp_1=`shader_body
394warp_2=`{
395warp_3=`//uv = uv_orig;
396warp_4=`ret.z = GetPixel(uv).z*0.5;
397warp_5=`
398warp_6=` float pixelDistance = 4;
399warp_7=` float motionStrength = 4;
400warp_8=`
401warp_9=` float diffusionFactor = 1;
402warp_10=` float decay = -0.014;
403warp_11=`
404warp_12=` float2 uv_y = lerp(uv_orig,uv,0);
405warp_13=` float2 dither_uv = uv_orig*texsize.xy*texsize_noise_lq.zw*diffusionFactor;
406warp_14=`
407warp_15=` float2 d = texsize.zw*pixelDistance;
408warp_16=` float1 dx = ( 2*GetBlur1(uv_y + float2(1,0)*d) - 2*GetBlur1(uv_y-float2(1,0)*d) ).y*0.5;
409warp_17=` float1 dy = ( 2*GetBlur1(uv_y + float2(0,1)*d) - 2*GetBlur1(uv_y-float2(0,1)*d) ).y*0.5;
410warp_18=`
411warp_19=` float2 my_uv = uv_y + float2(dx,dy)*texsize.zw*motionStrength;
412warp_20=`
413warp_21=` ret.y = tex2D( sampler_fw_main, saturate(my_uv)).y;
414warp_22=`
415warp_23=` ret.y += (ret - GetBlur1(uv_y)).y*0.025 + decay;
416warp_24=`
417warp_25=`
418warp_26=` ret.y += (tex2D(sampler_noise_lq, dither_uv).y-0.5)*0.02;
419warp_27=`
420warp_28=` dx = ( 2*GetBlur1(uv_y + float2(1,0)*d) - 2*GetBlur1(uv_y-float2(1,0)*d) ).x*0.5;
421warp_29=` dy = ( 2*GetBlur1(uv_y + float2(0,1)*d) - 2*GetBlur1(uv_y-float2(0,1)*d) ).x*0.5;
422warp_30=`
423warp_31=` my_uv = uv - float2(dx,dy)*texsize.zw*motionStrength;
424warp_32=`
425warp_33=`ret.x = GetPixel(my_uv).x - ret.y*0.01 + 0.004;
426warp_34=`ret.x += (tex2D(sampler_noise_lq, dither_uv).x-0.5)*0.01 + ret.z*0.14;
427warp_35=`}
428comp_1=`float2 complex_div(float2 numerator, float2 denominator){
429comp_2=` return float2( numerator.x*denominator.x + numerator.y*denominator.y,
430comp_3=` numerator.y*denominator.x - numerator.x*denominator.y)/
431comp_4=` (denominator.x*denominator.x + denominator.y*denominator.y);
432comp_5=`}
433comp_6=`
434comp_7=`float2 uv_polar(float2 domain, float2 center){
435comp_8=` float2 c = domain - center;
436comp_9=` float rad_hq = length(c);
437comp_10=` float ang_hq = atan2(c.x,c.y);
438comp_11=` return float2(ang_hq*M_INV_PI_2, rad_hq);
439comp_12=`}
440comp_13=`
441comp_14=`float2 uv_polar_logarithmic(float2 domain, float2 center, int fins, float log_factor, float2 coord){
442comp_15=` float2 polar = uv_polar(domain, center);
443comp_16=` return float2(polar.x*fins+coord.x, log_factor*log(polar.y) + coord.y);
444comp_17=`}
445comp_18=`
446comp_19=`float2 uv_moebius_transformation(float2 domain, float2 zeroPoint, float2 infinityPoint,float zoom){
447comp_20=` return complex_div((domain - zeroPoint)*zoom, domain - infinityPoint)+0.5;
448comp_21=`}
449comp_22=`
450comp_23=`float2 uv_bipolar(float2 domain, float2 northPole, float2 southPole, int fins, float log_factor, float2 coord){
451comp_24=` float2 help_uv = uv_moebius_transformation(domain, northPole, southPole, 1);
452comp_25=` return uv_polar_logarithmic(help_uv,0.5,fins,log_factor,coord);
453comp_26=`}
454comp_27=`
455comp_28=`
456comp_29=`float2 uv_rotate( float2 domain, float2 center, float sinw, float cosw, float scale){
457comp_30=` float2 uv_r = (domain-center);
458comp_31=` return center + float2( cosw*uv_r.x - sinw*uv_r.y, sinw*uv_r.x + cosw*uv_r.y)*scale;
459comp_32=`}
460comp_33=`
461comp_34=`
462comp_35=`shader_body
463comp_36=`{
464comp_37=`uv = 0.5 + (uv-0.5)*aspect.xy;
465comp_38=`
466comp_39=`float2 uvo = 0.5 + (uv-0.5)*float2(1.1,0.81);
467comp_40=`float2 factorA = uv-float2(1-0.5,0.5);
468comp_41=`float2 factorB = float2(0,-1024);
469comp_42=`float2 product = float2( factorA.x*factorB.x - factorA.y*factorB.y, factorA.x*factorB.y + factorA.y*factorB.x);
470comp_43=`float2 numerator = float2(1,0);
471comp_44=`float2 denominator = product;
472comp_45=`float2 fraction = float2( numerator.x*denominator.x + numerator.y*denominator.y, // the fractions real part
473comp_46=` numerator.y*denominator.x - numerator.x*denominator.y)/ // the fractions imaginary part
474comp_47=` (denominator.x*denominator.x + denominator.y*denominator.y);
475comp_48=`uv = fraction.yx*float2(-1,1)*100;
476comp_49=`uv = lerp(0.5 + (uvo-0.5)*2,uv+0.5,0.5);
477comp_50=`uv = 0.5 + (1.0 - abs( frac( uv * 0.5 ) * 2 - 1.0 )-0.5)*0.98; // Eo.S. mirror code with cutted borders
478comp_51=`
479comp_52=`uv = 0.5 + (uv-0.5)*aspect.yx;
480comp_53=`
481comp_54=`// bipolar
482comp_55=`uv = 0.5 + (uv-0.5)*1.5;
483comp_56=`float2 rotate_uv = 0.5+uv_rotate(0 + (uv-0.5)*aspect.xy, 0, q13, q14, 2);
484comp_57=`float2 bipolar_uv = uv_bipolar(rotate_uv,float2(0,0.5),float2(1,0.5), 2, 0.35, float2(q11,q12));
485comp_58=`float2 mirror_uv = 0.5 + (0.5 - abs( frac( bipolar_uv * 0.5 ) * 2.0 - 1.0 ));
486comp_59=`
487comp_60=`uv = mirror_uv;
488comp_61=`
489comp_62=`
490comp_63=`float2 d = texsize.zw*4;
491comp_64=`float1 dx = ( GetBlur1(uv+float2(1,0)*d)-GetBlur1(uv-float2(1,0)*d) ).y;
492comp_65=`float1 dy = ( GetBlur1(uv+float2(0,1)*d)-GetBlur1(uv-float2(0,1)*d) ).y;
493comp_66=`float2 uv_y = uv-float2(dx,dy)*0.4;
494comp_67=`
495comp_68=`ret = lerp(tex2D(sampler_fc_main, uv_y).x*pow(hue_shader.zxy,2),
496comp_69=` lerp(pow(hue_shader,4)*1.2,3,GetPixel(uv).z),
497comp_70=` GetBlur1(uv).y*0.7);
498comp_71=`}
499comp_72=`